<template>
  <div>
    <div>
      <h2>{{msg}}</h2>
    </div>
    <hr/>
    <h3>{{$store.state.count}}</h3>
    <div>
      <button @click="$store.commit('add')">加</button>
      <button @click="$store.commit('reduce')">减</button>
    </div>
  </div>
</template>
<script>
  import store from '../../store/store'
  export default{
      data(){
          return{
              msg:'test vuex'
          }
      },
      store
  }
</script>
